Data duplication detection in an in memory data grid (imdg)

ABSTRACT

Embodiments of the invention provide a method, system and computer program product for data duplication detection in an in memory data grid (IMDG). A method for data duplication detection in an IMDG includes computing a hash value for each binary data value in a key value pair of a partition in an IMDG. The method also includes generating a map including an entry for each unique computed hash value and one or more keys corresponding to binary data values of respective key value pairs from which the hash value had been uniquely computed. Thereafter, only those hash values in the map with multiple keys associated therewith are identified and binary data corresponding to the multiple keys of the identified hash values are reported as potential duplicate data in the IMDG.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to in memory database grid (IMDG)utilization and more particularly to detecting duplicate data in anIMDG.

2. Description of the Related Art

Database query processing refers to the receipt and execution of dataqueries against a database. Flat file databases generally processqueries in accordance with a key used to locate matching records and toreturn the matching records to the requestor. To the extent that data isto be culled from different related records, a series of queries arerequired to located different keys in different database tables so as toultimately return the desired set of data. Relational databases improveupon flat file databases by permitting the logical joining together ofdifferent tables so as to execute a single query against the joined setof tables in order to produce a desired set of data.

An in memory data grid (IMDG) is a highly distributable form of adatabase that permits parallel processing across a set of disparatelylocated computing devices. The use of an IMDG permits substantialparallelization of database operations and, in consequence, efficientutilization of unused processing resources in each host computing devicesupporting the IMDG. To the extent that data in the IMDG is highlydistributed, relational database concepts cannot be effectively applied.Thus, though highly scalable, database operations in an IMDG aresubstantially granular and numerous in comparison to that of atraditional relational database.

Abstractly, an IMDG is a distributed object store similar in interfaceto a typical concurrent hash map. In an IMDG objects are stored withkeys and an interface is provided as a simple hash map. In this regard,the fundamental IMDG paradigm is a key-value pair, wherein the grid ofthe IMDG stores values with an associated key, by which the value issubsequently retrieved. The map itself includes entries of suchkey-value pairs. Therefore, the map provides a picture of the content ofthe different nodes of the IMDG.

Given the nature of an IMDG, oftentimes data can be stored in duplicatein different portions of the IMDG. This duplication of data can ariseintentionally in consequence of data map duplication. Alternatively,this duplication can arise unintentionally in error. In either case,data duplication in an IMDG can have some adverse consequence. First,memory can be unnecessarily consumed to accommodate duplicate instancesof data. Second, data consistency can become compromised where oneinstance of duplicate data updates and a duplicate instance of the samedata does not update. As such, an inefficiency in the IMDG itself canresult.

BRIEF SUMMARY OF THE INVENTION

Embodiments of the present invention address deficiencies of the art inrespect to IMDG management and provide a novel and non-obvious method,system and computer program product for data duplication detection in anIMDG. In an embodiment of the invention, a method for data duplicationdetection in an IMDG is provided. The method includes computing by aprocessor of a computer a hash value for each binary data value in a keyvalue pair of a partition in an IMDG. The method also includesgenerating a map in memory of the computer the map including an entryfor each unique computed hash value and one or more keys correspondingto binary data values of respective key value pairs from which the hashvalue had been uniquely computed. Thereafter, only those hash values inthe map with multiple keys associated therewith are identified andbinary data corresponding to the multiple keys of the identified hashvalues are reported as potential duplicate data in the IMDG. In oneaspect of the embodiment, the method also includes removing the multiplekeys of the identified hash value from the partition of the IMDG.

Of note, the computing and generating can be performed by an agent inthe partition of the IMDG and wherein the identifying and reporting isperformed by a client of an interface to the IMDG. Alternatively, thecomputing and generating can be performed separately and independentlyby different agents in respectively different partitions of the IMDG andwherein the identifying and reporting is performed by a client of aninterface to the IMDG. As yet a further alternative, the computing andgenerating is performed separately and independently by different agentsin respectively different partitions of different IMDGs and wherein theidentifying and reporting is performed by a coordinating client of thedifferent IMDGs.

In another embodiment of the invention, a data processing system can beconfigured for data duplication detection in an IMDG. The system caninclude a host computing system that includes one or more computers eachwith memory and at least one processor. The system also can include atleast one server communicatively coupled to the host computing systemover a computer communications network and hosting in memory an IMDG.The system yet further can include an IMDG interface executing in thememory of the host computing system and providing access to the IMDG.Finally, the system can include a data duplication detection moduleexecuting in the memory of the host computing system.

The module can include program code enabled upon execution to compute ahash value for each binary data value in a key value pair of a partitionin the IMDG, to generate a map including an entry for each uniquecomputed hash value and one or more keys corresponding to binary datavalues of respective key value pairs from which the hash value had beenuniquely computed, to identify only those hash values in the map withmultiple keys associated therewith, and to report binary datacorresponding to the multiple keys of the identified hash values aspotential duplicate data in the IMDG.

Additional aspects of the invention will be set forth in part in thedescription which follows, and in part will be obvious from thedescription, or may be learned by practice of the invention. The aspectsof the invention will be realized and attained by means of the elementsand combinations particularly pointed out in the appended claims. It isto be understood that both the foregoing general description and thefollowing detailed description are exemplary and explanatory only andare not restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute partof this specification, illustrate embodiments of the invention andtogether with the description, serve to explain the principles of theinvention. The embodiments illustrated herein are presently preferred,it being understood, however, that the invention is not limited to theprecise arrangements and instrumentalities shown, wherein:

FIG. 1 is a pictorial illustration of a process for data duplicationdetection in an IMDG;

FIG. 2 is a schematic illustration of a data processing systemconfigured for data duplication detection in an IMDG; and,

FIG. 3 is a flow chart illustrating a process for data duplicationdetection in an IMDG.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments of the invention provide for data duplication detection inan IMDG. In accordance with an embodiment of the invention, the datacontent of a partition of a node in an IMDG can be processed to computehash values for the binary data contained therein. A map can bepopulated with a listing of each of the computed hash values andcorresponding keys for the binary data sharing the same computed hashvalue. Thereafter, hash values in the map having multiple keys arerecognized as being the source of potential duplicates in the IMDG. As afurther processing step, the binary data corresponding to the keys ofthe hash values in the map having multiple keys can be compared toconfirm the presence of duplicate data, and duplicate ones of themultiple keys can be discarded in the partition of the IMDG so as toeliminate the duplicate data. Of note, the process can be performedacross multiple partitions of the IMDG so that a separate map isproduced for each partition. Of additional note, the process can beperformed across multiple partitions by multiple IMDGs such that acoordinating client of the IMDGs can identified duplicate data disposedtherebetween.

In further illustration, FIG. 1 pictorially shows a process for dataduplication detection in an IMDG. As shown in FIG. 1, an IMDG 130 caninclude different nodes 110 each storing key value pairs 120corresponding to data stored therein. Optionally, the data of thedifferent nodes 110 can be persisted in fixed storage 140 and retrievedinto the IMDG 130 at runtime. Duplicate key detection logic 160 cananalyze a collection of different hashes 150 of the values of the keyvalue pairs 120. Different ones of the keys of the key value pairs 120corresponding to data of the key value pairs 120 sharing a same one ofthe hashes 150 can be stored in association with the same one of thehashes 150.

Subsequently, the duplicate key detection logic can identify those ofthe hashes 150 having multiple keys of the key value pairs 120associated therewith. In response to identifying the hashes 150 havingmultiple associated ones of the keys of the key value pairs 120, theunderlying values of the key value pairs 120 for the associated ones ofthe associated keys can be compared to truly identify duplicate data soas to indicate duplicate keys 170. As such, the duplicate keys 170having been identified, the duplicate keys 170 can be removed from thedifferent nodes 110. In this way, data duplication can be detected andremediated.

The process described in connection with FIG. 1 can be implemented in adata processing system configured for data duplication detection in anIMDG. In yet further illustration, FIG. 2 schematically shows a dataprocessing system configured for data duplication detection in an IMDG.The system can include a host computing system 210 the can include oneor more computers each with memory and at least one processor. The hostcomputing system 210 can support an interface 220 over a computercommunications network 230 to an IMDG 240 supported by different servers250. Optionally, a database 260 can be coupled to the IMDG 240 tosupport persistence of data in the IMDG 240.

Of note, a data duplication detection module 300 can execute in thememory of the host computing system 210. The data duplication module 300can include program code that when executed by one or more processors ofthe host computing system 210 is enabled to generate a hash value foreach of the data of the IMDG 240 and to store in a map each uniquelygenerated hash value and one or more keys corresponding to the data fromwhich the has value had been generated. The program code of the dataduplication module 300 also can be enabled to identify each uniquelygenerated hash value in association with which multiple keys are storedin the map. For each hash value for which multiple keys are associated,the data corresponding to the multiple keys can be compared so as toconfirm duplicate instances of the data. As such, the program code ofthe data duplication module 300 can remove from the IMDG 240 those ofthe multiple keys corresponding to the duplicate instances of the data.

In even yet more particular illustration of the operation of the dataduplication module 300, FIG. 3 is a flow chart illustrating a processfor data duplication detection in an IMDG. Beginning in block 305, aclient associated with the IMDG interface to the IMDG can invoke anagent in each partition of the IMDG. Referring to block 355, the agentin response to the client can create a duplication check map into whichdifferent hash values of data can be stored in association with one ormore keys for the data. In block 360, binary data can be loaded intomemory from which a hash value can be computed in block 365.

In decision block 370 it can be determined if the computed hash value isalready present as an existing hash value in the map. If not, in block380 the computed hash value can be added to the map and the key for thebinary data also can be added to the map in association with thecomputed hash value. Otherwise, in block 375 the key for the binary datacan be added to the map in association with the existing hash value. Indecision block 385, if additional binary data remains to be processed,the method can return to block 360 with the retrieval of additionalbinary data from the partition. When no further binary data remains tobe processed, in block 390 the agent can notify the client that theduplication check map has been completed.

In block 310, once the client has invoked the agent in each of thepartitions of the IMDG, the agents can be polled to determine indecision block 315 when a duplication check map has been completed for acorresponding partition. In decision block 315, when it is determinedthat a duplication check map has been completed in a correspondingpartition, in block 320 the duplication check map can be loaded intomemory for processing. In block 325, a first hash entry in the map canbe retrieved that has associated therewith multiple keys (hash entrieswith only a single associated key can be bypassed). In block 330, thebinary data for each key associated with the retrieved hash can becompared to one another to identify duplicate binary data. In decisionblock 335, if binary data match, in block 340 corresponding keys can bediscarded from the partition. Subsequently, in decision block 345 it canbe determined if additional hash entries remain to be processed. If not,in block 350 a report can be generated indicating the identified anddiscarded keys.

The present invention may be embodied within a system, a method, acomputer program product or any combination thereof. The computerprogram product may include a computer readable storage medium or mediahaving computer readable program instructions thereon for causing aprocessor to carry out aspects of the present invention. The computerreadable storage medium can be a tangible device that can retain andstore instructions for use by an instruction execution device. Thecomputer readable storage medium may be, for example, but is not limitedto, an electronic storage device, a magnetic storage device, an opticalstorage device, an electromagnetic storage device, a semiconductorstorage device, or any suitable combination of the foregoing.

A non-exhaustive list of more specific examples of the computer readablestorage medium includes the following: a portable computer diskette, ahard disk, a random access memory (RAM), a read-only memory (ROM), anerasable programmable read-only memory (EPROM or Flash memory), a staticrandom access memory (SRAM), a portable compact disc read-only memory(CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk,a mechanically encoded device such as punch-cards or raised structuresin a groove having instructions recorded thereon, and any suitablecombination of the foregoing. A computer readable storage medium, asused herein, is not to be construed as being transitory signals per se,such as radio waves or other freely propagating electromagnetic waves,electromagnetic waves propagating through a waveguide or othertransmission media (e.g., light pulses passing through a fiber-opticcable), or electrical signals transmitted through a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

Finally, the terminology used herein is for the purpose of describingparticular embodiments only and is not intended to be limiting of theinvention. As used herein, the singular forms “a”, “an” and “the” areintended to include the plural forms as well, unless the context clearlyindicates otherwise. It will be further understood that the terms“comprises” and/or “comprising,” when used in this specification,specify the presence of stated features, integers, steps, operations,elements, and/or components, but do not preclude the presence oraddition of one or more other features, integers, steps, operations,elements, components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

Having thus described the invention of the present application in detailand by reference to embodiments thereof, it will be apparent thatmodifications and variations are possible without departing from thescope of the invention defined in the appended claims as follows:

We claim:
 1. A method for data duplication detection in an in memorydata grid (IMDG), the method comprising: computing by a processor of acomputer a hash value for each binary data value in a key value pair ofa partition in an IMDG; generating a map in memory of the computer themap including an entry for each unique computed hash value and one ormore keys corresponding to binary data values of respective key valuepairs from which the hash value had been uniquely computed; identifyingonly those hash values in the map with multiple keys associatedtherewith; and, reporting binary data corresponding to the multiple keysof the identified hash values as potential duplicate data in the IMDG.2. The method of claim 1, further comprising removing the multiple keysof the identified hash value from the partition of the IMDG.
 3. Themethod of claim 1, wherein the computing and generating is performed byan agent in the partition of the IMDG and wherein the identifying andreporting is performed by a client of an interface to the IMDG.
 4. Themethod of claim 1, wherein the computing and generating is performedseparately and independently by different agents in respectivelydifferent partitions of the IMDG and wherein the identifying andreporting is performed by a client of an interface to the IMDG.
 5. Themethod of claim 1, wherein the computing and generating is performedseparately and independently by different agents in respectivelydifferent partitions of different IMDGs and wherein the identifying andreporting is performed by a coordinating client of the different IMDGs.